<?php


include_once 'GenericDAO.php';


class AlimentacionDao extends GenericDAO{
    
    public function __construct() {
    
        parent::__construct();
    }
    
    
    public function guardarAlimentacion($arrayValores){
        
        return $this->insertarRegistro("tb_alimentacion", $this->getNombresColumnasXTabla("tb_alimentacion"), $arrayValores);
          
        
    }
    
    
    public function getAlimentacionPorHotel($idHotel){
        $sql="SELECT 
                ali.id_tb_alimentacion, ali.descripcion_alimentacion
              FROM
                tb_alimentacion ali, tb_hotel_has_tb_alimentacion tbha
              WHERE
                ali.id_tb_alimentacion=tbha.tb_alimentacion_id_tb_alimentacion AND
                tbha.tb_hotel_id_tb_hotel=$idHotel";
        
        return $this->Conector->RetornarArrayFromQuery($sql);
        
    }
    public function consultarAlimentacion(){
      $sql="SELECT
                *
             FROM
                tb_alimentacion";
        
        return $this->Conector->RetornarArrayFromQuery($sql);  
    }
    
    
    
    
    
}

?>

